package com.rfid.manager;


public enum TokenManager {

    INSTANCE;

    String token;
    long lastTime;

    public String getToken() {
        if (System.currentTimeMillis() - lastTime > 1000*60*120) {
            return "";
        }
        return token;
    }

    public void setToken(String token) {
        this.token = token;
        lastTime = System.currentTimeMillis();
    }

}
